package DataModel.SegmentTree;

import java.util.ArrayList;

/**
 * Interface for Segment Tree Node
 * 
 * @author Guy
 *
 */
public interface SegmentTreeNode {
	/**
	 * 
	 * @return - Begining coord of the node
	 */
	public long  getBegining();
	
	/**
	 * 
	 * @return - End Coord of the node
	 */
	public long  getEnd();
	
	/**
	 * 
	 * @return - Left son of the node
	 */
	public SegmentTreeNode leftSon();
	
	/**
	 * Sets left son of the node
	 * @param node - Segment tree node to be the left son of the node
	 */
	public void setLeftSon(SegmentTreeNode node);
	
	/**
	 * Sets right son of the node
	 * @param node - Segment tree node to be the right son of the node
	 */
	public void setRightSon(SegmentTreeNode node);
	
	/**
	 * 
	 * @return - right son of the node
	 */
	public SegmentTreeNode rightSon();

	
	/**
	 * 
	 * @return Number of edges the node contains
	 */
	public int getNumEdges();
	
	/**
	 * 
	 * @return Array List of intervals the node contains
	 */
	public ArrayList getData();
		
	/**
	 * Adds new edge to the node (id of the edge)
	 * @param segementId
	 */
	public void insertData(long segementId);
	
	/**
	 * Removes edge from node (by id)
	 * @param segmentId
	 */
    public void removeData(long segmentId);
	
    /**
     * Sets generic data of the node
     * @param genericData
     */
    public void setGenericData(SegmentTreeNodeGenData genericData);
    
    /**
     * Gets generic data of the node
     * @return object implementig generic data interface
     */
    public SegmentTreeNodeGenData getGenericData();
  
	
}



